import request from '@/utils/request'

// 查询岗位列表
export function listDoor(query) {
  return request({
    url: '/device/door',
    method: 'get',
    params: query
  })
}

// 查询岗位列表
export function controDoor() {
  let aa = {
      "doorId":[1,2],
      "highLowSpeed":0,
      "openCloseDoor":0
  }
  return request({
    url: '/server/doorControl',
    method: 'post',
    data: aa
  })
}


// 查询岗位列表
export function listAllDoor() {
  return request({
    url: '/device/door/listAll',
    method: 'get'
  })
}

// 查询岗位详细
export function getDoor(doorId) {
  return request({
    url: '/device/door/' + doorId,
    method: 'get'
  })
}

// 新增岗位
export function addDoor(data) {
  return request({
    url: '/device/door',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateDoor(data) {
  return request({
    url: '/device/door',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delDoor(doorId) {
  return request({
    url: '/device/door/' + doorId,
    method: 'delete'
  })
}
